package com.example.peibei.service.presenter;

import com.dingtao.common.core.DataCall;
import com.dingtao.common.core.WDPresenter;
import com.dingtao.common.core.http.IAppRequest;

import io.reactivex.Observable;

public class GetComentListPresenter extends WDPresenter<IAppRequest> {

    private int page = 1;

    public GetComentListPresenter(DataCall dataCall) {
        super(dataCall);
    }
    public int getPage() {
        return page;
    }

    @Override
    protected Observable getModel(Object... args) {
        boolean refresh = (boolean)args[0];
        if (refresh){
            page = 1;
        }else{
            page++;
        }
        return iRequest.getCommentList((String)args[1],String.valueOf((long)args[2]),page,20);

    }
}
